package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TProprietorMapper;
import com.ruoyi.system.domain.TProprietor;
import com.ruoyi.system.service.ITProprietorService;

/**
 * illustriousness.`t_proprietor`Service业务层处理
 *
 * @author ruoyi
 * @date 2022-11-29
 */
@Service
public class TProprietorServiceImpl implements ITProprietorService
{
    @Autowired
    private TProprietorMapper tProprietorMapper;

    /**
     * 查询illustriousness.`t_proprietor`
     *
     * @param id illustriousness.`t_proprietor`主键
     * @return illustriousness.`t_proprietor`
     */
    @Override
    public TProprietor selectTProprietorById(Long id)
    {
        return tProprietorMapper.selectTProprietorById(id);
    }

    /**
     * 查询illustriousness.`t_proprietor`列表
     *
     * @param tProprietor illustriousness.`t_proprietor`
     * @return illustriousness.`t_proprietor`
     */
    @Override
    public List<TProprietor> selectTProprietorList(TProprietor tProprietor)
    {
        return tProprietorMapper.selectTProprietorList(tProprietor);
    }

    /**
     * 新增illustriousness.`t_proprietor`
     *
     * @param tProprietor illustriousness.`t_proprietor`
     * @return 结果
     */
    @Override
    public int insertTProprietor(TProprietor tProprietor)
    {
        tProprietor.setCreateTime(DateUtils.getNowDate());
        return tProprietorMapper.insertTProprietor(tProprietor);
    }

    /**
     * 修改illustriousness.`t_proprietor`
     *
     * @param tProprietor illustriousness.`t_proprietor`
     * @return 结果
     */
    @Override
    public int updateTProprietor(TProprietor tProprietor)
    {
        tProprietor.setUpdateTime(DateUtils.getNowDate());
        return tProprietorMapper.updateTProprietor(tProprietor);
    }

    /**
     * 批量删除illustriousness.`t_proprietor`
     *
     * @param ids 需要删除的illustriousness.`t_proprietor`主键
     * @return 结果
     */
    @Override
    public int deleteTProprietorByIds(Long[] ids)
    {
        return tProprietorMapper.deleteTProprietorByIds(ids);
    }

    /**
     * 删除illustriousness.`t_proprietor`信息
     *
     * @param id illustriousness.`t_proprietor`主键
     * @return 结果
     */
    @Override
    public int deleteTProprietorById(Long id)
    {
        return tProprietorMapper.deleteTProprietorById(id);
    }
}
